import java.util.Arrays;

public class a5 {

	

		public static void main(String[] args) {
			int[] array = {11,37,12,72,58};
			for(int i=0;i<array.length-1;i++) {
				for(int j=0;j<array.length-i-1;j++) {
					if(array[j]>array[j+1]) {
						int t=array[j];
						array[j]=array[j+1];
						array[j+1]=t;
					}
				}
			}
			
			System.out.println(Arrays.toString(array));

	}

}
